<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="../inc/TagLibs.jsp"%>
<c:if test="${estType=='CLIENT'}">
	<c:set var="etName" value="客户" />
</c:if>
<c:if test="${estType=='PROVIDER'}">
	<c:set var="etName" value="供应商" />
</c:if>
<c:if test="${estType=='COOPERATOR'}">
	<c:set var="etName" value="外协商" />
</c:if>
<c:set var="pageTitle" value="${etName}移交" />
<%@ include file="../inc/Title.jsp"%>
<head>
<link rel="stylesheet" type="text/css" href="/css/base.css" />
<script src="/js/popup_ext.js"></script>
<script language="javascript">
	function doOk(){
		var toId=document.getElementById("to_id").value;
		if(toId==null || toId=='' || toId=="0"){
			ShowAlert('提示框','请选择要转入的业务员',200,100);
			return;
		}
		ShowConfirm('确认框','确定进行移交吗？',340,80,"doOkCallBack("+toId+")",340,210);
	}
	function doOkCallBack(toId){
		if(popRetVal!=null){
			window.location="/base/EstablishmentMove.ihtm?est_type=${estType}&type=MULTI&id_str=${idStr}&to_mng_id="+toId;
		}
	}
	function doCancel(){
		parent.ClosePop();
	}
	function selectToManager(){
		var url="/base/StafferMainForSelect.ihtm";
		ShowIframe("选择员工",url,800,500,"selectToManagerCallBack()",340,210);
	}
	function selectToManagerCallBack(){
		if(popRetVal!=null){
			var arr=popRetVal.split(";");
			document.getElementById("to_id").value=arr[0];
			document.getElementById("to_name").value=arr[1];
		}
	}
	function doInit(){
		showFormErrorMsg();
	}
</script>
</head>
<body oncontextmenu="return false" onload="doInit();" class="sheet modal-dialog" style="padding-top:10px;text-align:left;">
<div class="sheet-main" id="bodyDiv" style="width:315px;">
	  <div class="sheet-list" style="width:100%">
	    <div class="modal-main search-business">
	    	<div style="width:100%;">
				<c:set var="pageTopTitle" value="${etName}移交" />
				<c:set var="pageTopMark" value="" />
				<%@ include file="../inc/PageTop.jsp"%>
				<table border="0" cellspacing="1" cellpadding="1" align="center" class="table-a">
						<tr>
							<th>转给：</th>
							<td>
								<input class="TextBox readonly" style="width:140px" readOnly="true" type="text" name="to_name" id="to_name" value="">
								<input type="hidden" name="to_id" id="to_id" value="">
								<img class="make-a" src="/images/make-a.gif" style="cursor:pointer;" onClick="selectToManager();">
							</td>
						</tr>	
				</table>
			</div>
	  	</div>
	  </div>
		<div class="modal-buttom">
			<input type="button" class="buttom-a" value=" 确 定 " onClick="doOk();">
			<input type="button" class="buttom-a" value=" 取 消 " onClick="doCancel();">
		</div>
</div>			   	
</body>
</html>